<?php
use common\service\StaticService;
use common\service\GlobalUrlService;
use shopend\assets\ShopAsset;
use common\service\CommonService;
StaticService::includeAppCssStatic(GlobalUrlService::buildShopStaticUrl('/css/order/get-info.css'),ShopAsset::class);
$this->title = '订单详情';
?>
<div class="content_box">
  <div class="order_info">
    <form class="layui-form">
        <fieldset class="layui-elem-field">
          <legend>订单信息</legend>
          <div class="layui-field-box">
            <ul>
              <li>
                <span class="layui-inline">订单编号</span>
                <span class="layui-inline"><?= $data['order_no']?></span>
            </li>
            <li>
                <span class="layui-inline">订单状态</span>
                <span class="layui-inline"><?php echo CommonService::getOrderStatus($data['order_status']);?></span>
            </li>
            <li>
                <span class="layui-inline">类型</span>
                <span class="layui-inline"><?php if($data['order_type'] ==1){
                                echo '团购';
                            }else{echo '单独购买';}?></span>
            </li>
            <li>
                <span class="layui-inline">运单号</span>
                <span class="layui-inline"><?= $data['transport_no']?></span>
            </li>
            <li>
                <span class="layui-inline">流水号</span>
                <span class="layui-inline"><?= $data['serial_no']?></span>
            </li>
        </ul>
    </div>
</fieldset>
<fieldset class="layui-elem-field">
  <legend>时间信息</legend>
  <div class="layui-field-box">
    <ul>
      <li>
        <span class="layui-inline">下单时间</span>
        <span class="layui-inline"><?= date('Y-m-d H:i:s',$data['created_time'])?></span>
    </li>
    <li>
        <span class="layui-inline">完成时间</span>
        <span class="layui-inline"><?php if(empty($data['complete_time'])):else:echo date('Y-m-d H:i:s',$data['complete_time']); endif;?></span>
    </li>
</ul>
</div>
</fieldset>
<fieldset class="layui-elem-field">
  <legend>支付信息</legend>
  <div class="layui-field-box">
    <ul>
      <li>
        <span class="layui-inline">订单金额</span>
        <span class="layui-inline"><?= $data['order_money']?></span>
    </li>
    <li>
        <span class="layui-inline">支付时间</span>
        <span class="layui-inline"><?= date('Y-m-d H:i:s',$data['pay_time'])?></span>
    </li>
</ul>
</div>
</fieldset>

<fieldset class="layui-elem-field">
  <legend>用户信息</legend>
  <div class="layui-field-box">
    <ul>
      <li>
        <span class="layui-inline">收货人</span>
        <span class="layui-inline"><?= $data['addressee_name']?></span>
    </li>
    <li class="site">
        <span class="layui-inline title">收货地址</span>
        <span class="layui-inline item">
            <?= $data['province'].' '.$data['city'].' '. $data['county'].' '. $data['address']?>
        </span>
    </li>
    <li>
        <span class="layui-inline">手机号</span>
        <span class="layui-inline"><?= $data['addressee_phone']?></span>
    </li>
    <li>
        <span class="layui-inline">订单备注</span>
        <span class="layui-inline"><?= $data['remark']?></span>
    </li>
</ul>
</div>
</fieldset>
<fieldset class="layui-elem-field">
  <legend>商品信息</legend>
  <div class="layui-field-box">
    <ul>
      <li>
        <span class="layui-inline">店铺ID</span>
        <span class="layui-inline"><?= $data['shop_id']?></span>
    </li>
    <li>
        <span class="layui-inline">店铺名称</span>
        <span class="layui-inline"><?= $data['shop_name']?></span>
    </li>
    <li>
        <span class="layui-inline">sku</span>
        <span class="layui-inline"><?= $data['sku']?></span>
    </li>
    <li>
        <span class="layui-inline">商品数量</span>
        <span class="layui-inline"><?= $data['goods_num']?></span>
    </li>
    <li>
        <span class="layui-inline">活动名称</span>
        <span class="layui-inline"><?= $data['activity_name']?></span>
    </li>
    <li class="imgs">
        <span class="layui-inline">团员</span>
        <span class="layui-inline">
            <?php foreach ($users as $user):?>
                                    <img src="<?= $user['avatarurl']?>">
                            <?php endforeach;?>
      </span>
  </li>
</ul>
</div>
</fieldset>
<div class="btns">
    <input type="hidden" name="id" value="<?= $data['id']?>">
    <a class="layui-btn layui-btn-primary"  onclick="window.history.go(-1)">返回</a>
</div>
</form>
</div>
</div>
